﻿<div id="Content-Body" style="min-width:1000px;">
    <div class="toggle">
        <span class="data-fill" resource="Configs-Table-Paging">共 @Total 条数据</span>

        <button class="item active">所有配置项</button>
    </div>
    <div class="tools">
        <!--<input type="button" class="button right super-search" resource="Configs-Table" value="高级搜索" />-->
        <form class="filter right" resource="Configs-Table,Configs-Table-Paging">
            <input class="left w280 input" type="text" name="[Fuzzy]Name" placeholder="搜索名称..." /><input type="submit" class="right button" value="Q" />
        </form>

        <!--<input type="button" class="tool button refresh" resource="Configs-Table" value="刷新" />-->
        <input type="button" class="tool button insert" resource="Configs-Table" frame="TempConfigFrame" command="InsertConfig" value="新增" />
        <input type="button" class="tool button update" resource="Configs-Table" frame="TempConfigFrame" command="UpdateConfig" value="修改" />
        <input type="button" class="tool button delete" resource="Configs-Table" command="DeleteConfig" value="删除" />
    </div>
    <div class="table-box">
        <table class="table" id="Configs-Table" command="ReadPageConfigs" parameters="Begin:1,End:12,DefaultOrders:'DId'">
            <thead>
                <tr>
                    <td name="selection" style="width:30px;"><input type="checkbox" /></td>
                    <td class="sort" name="Id" style="width:30px;">ID</td>
                    <td class="sort" name="Name" style="width:120px;">名称</td>
                    <td class="sort" name="Type" style="width:80px;" renderer="return Renderers.valueType(data.Type)">类型</td>
                    <td class="sort" name="Value" style="width:180px;">值</td>
                    <td class="sort" name="Description" style="width:300px;">说明</td>
                </tr>
            </thead>
        </table>
    </div>

    <div id="Configs-Table-Paging" command="GetConfigsTotal" resource="Configs-Table"></div>

    <form id="TempConfigFrame" text="配置项信息" class="frame temp" onsubmit="return app.frameSubmit(this)" style="width:480px;height:380px;margin-left: 0px; margin-top: 0px; top: 20%; left: 20%;">
        <div class="top">
            <div class="right">
                <span class="min" title="最小化"></span>
                <span class="max" title="最大化"></span>
                <span class="close" title="关闭"></span>
            </div>
            <span class="title">查看/修改配置项信息</span>
        </div>
        <div class="content" readonly-where="data.Readonly">
            <div class="content">
                <span class="title">基本信息</span>
                <input type="hidden" name="Id" />
                <div class="item">
                    <label class="text">名称：</label>
                    <input verify="notNull" class="input w280" type="text" name="Name" placeholder="名称" />
                </div>
                <div class="item">
                    <label class="text">类型：</label>
                    <select verify="notNull" class="input w280" placeholder="类型" name="Type">
                        <option value="1">Boolean</option>
                        <option value="2">Int</option>
                        <option value="4">Long</option>
                        <option value="8">Float</option>
                        <option value="16">Double</option>
                        <option value="2048">Decimal</option>
                        <option value="32">String</option>
                        <option value="64">DateTime</option>
                        <option value="128">TimeSpan</option>
                        <option value="256">Guid</option>
                        <option value="512">Object</option>
                        <option value="1024">Ids</option>
                    </select>
                </div>
                <div class="item">
                    <label class="text">值：</label>
                    <input verify="notNull" class="input w280" type="text" name="Value" placeholder="值" />
                </div>
                <div class="item">
                    <label class="text">说明：</label>
                    <input verify="notNull" class="input w280" type="text" name="Description" placeholder="说明" />
                </div>
            </div>
        </div>
        <div class="bottom">
            <input type="submit" class="button" value="保存修改" display-where="!data.Readonly" />
            <input type="button" class="button close" value="返回" />
        </div>
    </form>

    <script>
        $("#TempConfigFrame").on("process", function (e, Data) {
        });

        $("#TempConfigFrame").on("apply", function (e, Data) {
        });


        $.extend(window, {
        });

        app.control($("#Configs-Table"), "table");
        app.control($("#Configs-Table-Paging"), "paging");
        app.control($("#Content-Body"), "content");
    </script>
</div>